import Vue from "vue";
import { MenuItem } from "./menu-item";
import { MenuType } from "./menu-type";

export { MenuType, MenuItem };

export const AuthMenus: MenuItem[] = Vue.observable([]);

const debugMenus: typeof AuthMenus = [
  {
    name: "首页",
    description: "首页",
    icon: {
      code: "el-icon-s-home",
      type: 1,
    },
    menuType: 5,
    order: -32768,
    isFixed: false,
    isVisibled: true,
    isDefault: false,
    isHome: false,
    canSetFixed: false,
    canClose: true,
    code: "M01",
  },
  {
    pcode: "M01",
    name: "主控台",
    description: "主控台",
    icon: {
      code: "speedometer2",
      type: 2,
    },
    menuType: 1,
    url: "/Home/Dashboard",
    order: 0,
    isFixed: true,
    isVisibled: true,
    isDefault: true,
    isHome: true,
    canSetFixed: false,
    canClose: false,
    code: "M0101",
  },
  {
    name: "关于",
    description: "关于",
    icon: {
      code: "speedometer2",
      type: 2,
    },
    menuType: 0,
    order: 0,
    isFixed: true,
    isVisibled: true,
    isDefault: true,
    isHome: true,
    canSetFixed: false,
    canClose: false,
    code: "M02",
  },
  {
    pcode: "M02",
    name: "关于",
    description: "关于",
    icon: {
      code: "speedometer2",
      type: 2,
    },
    menuType: 1,
    url: "/About/Index",
    order: 0,
    isFixed: true,
    isVisibled: true,
    isDefault: true,
    isHome: true,
    canSetFixed: false,
    canClose: false,
    code: "M0202",
  },
  {
    pcode: "M02",
    name: "关于22",
    description: "",
    icon: {
      code: "speedometer2",
      type: 2,
    },
    menuType: 4,
    url: "https://map.baidu.com",
    order: 0,
    isFixed: true,
    isVisibled: true,
    isDefault: true,
    isHome: true,
    canSetFixed: false,
    canClose: false,
    code: "M0203",
  },
  //#endregion

  // {
  //   code: "M01",
  //   pcode: null,
  //   name: "一级菜单",
  //   menuType: MenuType.SubMenu,
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },
  // {
  //   code: "M0101",
  //   pcode: "M01",
  //   name: "二级菜单",
  //   menuType: MenuType.SubMenu,
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },
  // {
  //   code: "M0102",
  //   pcode: "M01",
  //   name: "二级菜单",
  //   menuType: MenuType.SubMenu,
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },
  // {
  //   code: "M010101",
  //   pcode: "M0101",
  //   name: "三级菜单",
  //   menuType: MenuType.TabIframe,
  //   url: "https://map.baidu.com",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },
  // {
  //   code: "M010102",
  //   pcode: "M0101",
  //   name: "三级菜单",
  //   menuType: MenuType.TabIframe,
  //   url: "https://map.baidu.com",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },
  // {
  //   code: "M010201",
  //   pcode: "M0102",
  //   name: "三级菜单",
  //   menuType: MenuType.TabIframe,
  //   url: "https://map.baidu.com",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },

  // {
  //   code: "M02",
  //   pcode:null,
  //   name: "三级菜单",
  //   menuType: MenuType.TabIframe,
  //   url: "https://map.baidu.com",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  // },

  // {
  //   code: "M0102",
  //   pcode: null,
  //   name: "百度地图",
  //   menuType: MenuType.TabIframe,
  //   url: "https://map.baidu.com",
  //   description: "描述信息",
  //   order: 1,
  //   isAuthority: false,
  //   isVisibled: true,
  //   icon: { type: 0 },
  // },
  // {
  //   code: "M0101",
  //   pcode: null,
  //   name: "淘宝",
  //   menuType: MenuType.TabIframe,
  //   url: "https://www.taobao.com",
  //   description: "描述信息",
  //   order: 1,
  //   isAuthority: false,
  //   isVisibled: true,
  //   icon: {
  //     type: 0,
  //   },
  // },

  // {
  //   code: "M-Other",
  //   pcode: null,
  //   name: "其他",
  //   menuType: MenuType.TabRouterView,
  //   url: "/About",
  //   description: "关于",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  //   icon: {
  //     type: 0,
  //   },
  // },
  // {
  //   code: "H-Detail",
  //   pcode: null,
  //   name: "明细测试",
  //   menuType: MenuType.TabRouterView,
  //   url: "/details?id=123",
  //   description: "明细测试",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: false,
  //   icon: {
  //     type: 0,
  //   },
  // },
  // {
  //   code: "M-Settings",
  //   pcode: null,
  //   name: "设置",
  //   menuType: MenuType.SidebarIframe,
  //   url: "https://npmmirror.com/",
  //   description: "设置",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  //   icon: {
  //     type: 0,
  //   },
  //   options: {
  //     size: "50%",
  //   },
  // },
  // {
  //   code: "M-Icons",
  //   pcode: null,
  //   name: "图标",
  //   menuType: MenuType.SidebarIframe,
  //   url: "/icons.html",
  //   description: "图标",
  //   order: 0,
  //   isAuthority: false,
  //   isVisibled: true,
  //   icon: {
  //     type: 0,
  //   },
  //   options: {
  //     size: "1000px",
  //   },
  // },
];

AuthMenus.push(...debugMenus);
